import App from './App'
import message from '@/utils/message'
import Layui from "@/components/Layui.vue"
import HeadBar from '@/components/HeadBar.vue'
import FuiInput from "@/components/firstui/fui-input/fui-input.vue"
import FuiTag from "@/components/firstui/fui-tag/fui-tag.vue"
import Skeleton from "@/components/firstui/fui-skeleton/fui-skeleton.vue"
import FuiButton from "@/components/firstui/fui-button/fui-button.vue"
import "./static/style/common.css";

// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
  ...App
})
app.use(message)
app.component('Layui', Layui)
app.component('HeadBar',HeadBar)
app.component('FuiInput',FuiInput)
app.component('FuiTag',FuiTag)
app.component('Skeleton',Skeleton)
app.component('FuiButton',FuiButton)
app.$mount()

// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  app.use(message)
  app.component('Layui', Layui)
  app.component('HeadBar',HeadBar)
  app.component('FuiInput',FuiInput)
  app.component('Skeleton',Skeleton)
  app.component('FuiTag',FuiTag)
  app.component('FuiButton',FuiButton)
  return {
    app
  }
}
// #endif